class Formstone
  constructor:->
    @tooltip("a.Tooltip")
    @toggle("input[type=checkbox].Toggle")
    $("input[type=checkbox]")?.checkbox()
    $("input[type=number]")?.number()
  tooltip:(selecter)->
    $(selecter).tooltip
      direction: "left"
  toggle:(selecter)->
    $(selecter)?.checkbox
      toggle:true
      labels:
        on:"是"
        off:"否"

thin.define "$formstone",[],->
  return new Formstone
